package com.itheima.demo01lambda;

/**
 * @author chenming
 * Date  2023/6/6 15:41
 * @version 1.0
 * description
 */
public class Demo02LambdaUse {
    public static void main(String[] args) {
        goSwimming(new Swimmable() {
            @Override
            public void swimming() {
                System.out.println("匿名内部游泳！");
            }
        });


        goSwimming(()-> System.out.println("Lambda内部游泳"));
    }

    public static void goSwimming(Swimmable swimmable){
        swimmable.swimming();
    }


}
